﻿var displayImgList = new Array();
var countImage = 0;
var delayTime = 3500;

function changeExec(displayImgList) {
    if (countImage < displayImgList.length) {
        var orderImage = new Array();
        orderImage = displayImgList[countImage];
        delayTime = orderImage[2];
        document.getElementById("movieFrame").src=orderImage[1];
        countImage++;
    }
    else {
        setTimeout(function () { document.getElementById("movieFrame").src = "./endTitle.png"; }, 3500);
        setTimeout(function () { resetMain() }, 3500);
        displayImgList = null;
        countImage = 0;
        return;
    }
    setTimeout(function () { changeExec(displayImgList) }, delayTime);
}

function resetMain() {
    document.getElementById("movieFrame").src = "./movie_clapperboard.png";
    document.getElementById("movieTitle").innerHTML = "";
}

